package com.cql.sys.mapper;

import com.cql.pojo.Detials;
import com.cql.pojo.Dict;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DictMapper {

    //添加字典
    int addDict(Dict dict) throws Exception;

    @Select(" select dname from t_dict where dname = #{dname} and isDel = 0  ")
    //查询字典
    Dict findDict(String name) throws Exception;

    // 查询所有字典
    List<Dict> findAllDicts();

    Dict findDictById(Integer id) throws Exception;
    int updateDictById(Dict dict) throws Exception;

    @Select(" select * from t_dict_detail where dtag = #{dname} ")
    List<Detials> findDetials(String dname) throws  Exception;
}
